//package com.tpp.threat_perception_platform.config;
//
//import com.rabbitmq.client.ConnectionFactory;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class RabbitMqConfig {
//    @Bean
//    public RabbitTemplate rabbitTemplate(ConnectionFactory factory){
//        return new RabbitTemplate(factory);
//    }
//}

package com.tpp.threat_perception_platform.config;

import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/*
  * @Description: RabbitMq配置类
 */
@Configuration
public class RabbitMqConfig {

    @Bean
    public RabbitTemplate rabbitTemplate(ConnectionFactory factory){
        return new RabbitTemplate(factory);
    }
}
